<!DOCTYPE html>
<html>
<head>
  <title>User Agent Example</title>
  <script>
    function showUserAgent() {
      var userAgent = navigator.userAgent;
      document.getElementById("userAgent").innerHTML = userAgent;
    }
  </script>
</head>
<body onload="showUserAgent()">
  <h1>User Agent Example</h1>
  <p id="userAgent">Loading...</p>
</body>
</html>